package com.xteam.ecsystem.service.front;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xteam.ecsystem.dao.IFrontGoodsDao;
import com.xteam.ecsystem.entities.BaseGoodsInfo;
import com.xteam.ecsystem.entities.BaseGoodsPicture;
import com.xteam.ecsystem.utils.PageCenterStation;
@Service
public class FrontGoodsInfoService {
	
	@Autowired
	private IFrontGoodsDao ifgDao;
	
	/**
	 * 
	 * 根据商品ID返回商品信息。
	 * @author ls
	 * @param goodsId
	 * @return
	 */
	public BaseGoodsInfo getGoodsInfoById(String goodsId) {
		return ifgDao.getGoodsInfoById(goodsId);
	}
	
	/**
	 * 
	 * 获取相关商品
	 * @author ls
	 * @param goodsId
	 * @param pageindex
	 * @param pagesize
	 * @return
	 */
	public PageCenterStation<?> getRelatedGoods(String goodsId, int pageIndex,
			int pageSize) {
		return ifgDao.getRelatedGoods(goodsId, pageIndex, pageSize);
	}

	/**
	 * 
	 * 获取过滤属性条件
	 * @author ls
	 * @param group
	 * @return
	 */
	public List<?> getFilterAttr(String group) {
		return ifgDao.getFilterAttr(group);
	}

	/**
	 * 
	 * 获取过滤品牌条件
	 * @author ls
	 * @param group
	 * @return
	 */
	public List<?> getFilterBrand(String group) {
		return ifgDao.getFilterBrand(group);
	}

	/**
	 * 
	 * 获取过滤价格条件
	 * @author ls
	 * @param group
	 * @return
	 */
	public List<?> getFilterPrice(String group) {
		return ifgDao.getFilterPrice(group);
	}

	/**
	 * 
	 * 获取商品图片
	 * @author ls
	 * @param goodsId
	 * @return
	 */
	public BaseGoodsPicture getGoodsPic(String goodsId) {
		return ifgDao.getGoodsPic(goodsId);
	}

	/**
	 * 
	 * 获取商品图片列表
	 * @author ls
	 * @param goodsId
	 * @return
	 */
	public List<?> getGoodsPicList(String goodsId) {
		return ifgDao.getGoodsPicList(goodsId);
	}

}
